<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添福彩票后台管理系统</title>
	<link rel="stylesheet" type="text/css" href="/static/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="/static/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="/static/css/style.css">
	
	<script type="text/javascript" src="/static/js/jquery-1.6.min.js"></script>
	<script type="text/javascript" src="/static/js/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="/static/js/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="/static/js/jbox/jquery.jBox-2.2.min.js"></script>
    <link id="skin" rel="stylesheet" href="/static/js/jbox/Skins/Blue/jbox.css" />
	
	<script>
	function add(href,title){
		//alert({{request.session.user.loginname}})
	    var pp = $('#tabs').tabs('getTab',title);
	    if(!pp){
              
	    }else{
	    	$('#tabs').tabs('select',title);
	    	var tab = $('#tabs').tabs('getSelected');
	    	$("#tabs").tabs("close", tab.panel('options').tab.text());
	    }
	    
	    $('#tabs').tabs('add',{
		    title:title,
		    href:href,
		    iconCls:'icon-save',
		    closable:true
	    });
	    return false;  
	}
	
	function openwin(value){		   
           var message = '您确定要退出吗？<br/>' ;

           $.jBox.confirm(message, "提示", function (v, h, f) {
               if (v == 'ok'){
           	    $.ajax({
                       type:'POST',
                       url:'/logout',
                       data: {id:value},
                       success:function(data,status){
                   	    $.jBox.tip('安全退出', 'success');
                   	    location.reload();
                       },
                       error:function (req, status, error){
                   	    $.jBox.tip('退出失败，请重试', 'error');
                       }
                   });
               }
              return true;
            });
  	     return false;
           
	   }
		function clomar(){
			var message = '您确定要关闭充值提醒吗？<br/>' ;
	        $.jBox.confirm(message, "提示", function (v, h, f) {
	            if (v == 'ok'){	            	
	                    	$.jBox.tip('操作成功', 'success');	                    
	                    	window.location.href="rehome12"
	                    }	           
	        });
	       	return false;
		}
		   
	</script>
</head>

<body class="easyui-layout" style="background-color:red">
        <div region="north" split="true" style="height:58px;overflow:hidden;">
        
			<div id="header">
			
			    <div class="logo fleft"><img src="/static/images/tianfu.png" width="360" height="80" /></div>
			   
			    <div class="nav fleft">
			    
			    	<ul>
			        	<div class="nav-left fleft"></div>
			        	{% if setting_value != "null" and setting_value > balance %}			        			        	
			            <li class="first" ><marquee  height="45" direction="LEFT" scrolldelay="40" scrollamount="3" onmouseover="this.stop()" onmouseout="this.start()"> <font color="black">您的余额已不足{{setting_value}}元，请尽快充值！&nbsp;&nbsp;&nbsp;&nbsp;</font><a onclick="javascript:return clomar();" href="#" ><font color="blue">[我知道了]</font></a></marquee></li>                                                                                                                                                                                                                                                                                                                                                           
                        {% else %}	
                        {% if not lastlogintime %}
                        <li class="first"><font color="black">您好&nbsp;{{loginname}},&nbsp;欢迎您访问添福彩票管理系统！&nbsp;&nbsp;安全提醒：当前为首次登录，请修改密码！</font></li>	
                        {% else %}	           
                        <li class="first"><font color="black">您好&nbsp;{{loginname}},&nbsp;欢迎您访问添福彩票管理系统！&nbsp;&nbsp;您上次登录时间：{{lastlogintime}}</font></li>                                               
                        {% endif %}
                        {% endif %}
			            <div class="nav-right fleft"></div>
			        </ul>
			    </div>
            
			    <a class="logout fright" onclick="javascript:return openwin('+{{loginname}}+');" href="#"><img src="/static/images/xyq-logout.png" width="17" height="16"  />&nbsp;&nbsp;安全退出&nbsp;&nbsp;</a>
                
			    <div class="clear"></div>
			    <div class="subnav">
			    	<div class="subnavLeft fleft"></div>
			        <div class="fleft"></div>
			        <div class="subnavRight fright"></div>
			    </div>
			</div>
        </div>
        
		<div region="west" split="false" title="功能菜单" style="width:200px;padding:1px;overflow:auto;">
			<div class="easyui-accordion left-menu" fit="false" border="true" animate="true">
			<input type="hidden" id="recordid" value="{{accountType}}">
			
				<div title="额度账户" class="left_menu_module">
				     
				 
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/account/detailinfo','账户信息');">账户信息</a></p>
					{% if accountType == 0 %}
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/account/update_recharge','账户充值');">账户充值</a></p>
					{% endif %}
					{% if accountType == 2 %}
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/account/company_recharge','账户充值');">账户充值</a></p>
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/accounts/history_recharge','历史充值记录');">历史充值记录</a></p>
					{% endif %}
					
					
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/account/list','账户管理');">账户管理</a></p>
					
					{% if accountType == 0 %}
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/account/application-cash','提现申请');">提现申请</a></p>
					{% endif %}
					{% if accountType == 2%}
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/account/account-withdraws','提现审批');">提现审批</a></p>
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/accounts/history_record0','历史提现记录');">历史提现记录</a></p>
				    {% endif %}
				</div>
				<div title="统计查询" class="left_menu_module">
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/count_inquire/saleinquire','销售明细');">销售明细</a></p>
					{% if accountType == 2 %}
                    <p class="left_menu_item"><a href="#" onclick="add('/lottery/count_inquire/statistics','月度统计');">月度统计</a></p>
                    <p class="left_menu_item"><a href="#" onclick="add('/lottery/balance/page','收支明细');">收支明细</a></p>
                    {% endif %}
				</div>
				{% if accountType == 2 %}
				<div title="返奖管理" class="left_menu_module">
				
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/prize/prizelist','返奖明细');">返奖明细</a></p>
					
				</div>
				{% endif %}
				<!-- 
				<div title="日志记录" class="left_menu_module">
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/tjcheck/shopkeeper','返奖明细');">帐户日志</a></p>
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/tjcheck/shopkeeper','返奖汇总');">管理员日志</a></p>
				</div>
				 -->
				<div title="系统设置" class="left_menu_module">
				{% if accountType == 2 %}
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/settings/systemsettings','系统设置');">系统设置</a></p>
					{% endif %}
					<p class="left_menu_item"><a href="#" onclick="add('/lottery/settings/modifypwd','密码设置');">密码设置</a></p>
				</div>
				
			</div>
		</div>
		<div region="center" style="overflow:hidden;">
			<div class="easyui-tabs" fit="true" border="false" id="tabs">

			</div>
		</div>
		
</body>
</html>
